﻿<Grid
    x:Class="Antares.VIEWs.WeekItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Antares.VIEWs"
    xmlns:viewmodel="using:Antares.VIEWMODELs"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="300"
    d:DesignWidth="400">

    <Grid.Resources>
        <DataTemplate
                x:Key="DayItemTemplate">
            <local:DayItem/>
        </DataTemplate>
    </Grid.Resources>
    
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition x:Name="Test" Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
       <GridView
            ItemContainerStyle="{StaticResource GridViewItemStyle1}"
           Grid.ColumnSpan="7"
            x:Name="WeekGrid"
            SelectionMode="None"
            ItemTemplate="{StaticResource DayItemTemplate}"
            ScrollViewer.HorizontalScrollBarVisibility="Disabled"
            SelectedItem="{Binding SelectedItem}"
            ItemsSource="{Binding Days}">
            <GridView.ItemsPanel>
                <ItemsPanelTemplate>
                    <VariableSizedWrapGrid 
                        ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                        Margin="0,0,-8,2"
                        Orientation="Horizontal"
                        
                        ItemWidth="{Binding ActualWidth, ElementName=Test}">
                    </VariableSizedWrapGrid>
                </ItemsPanelTemplate>
            </GridView.ItemsPanel>
        </GridView>
    </Grid>
</Grid>
